<%-- 
    Document   : lstMenuOpciones
    Created on : 19/01/2012, 11:39:03 AM
    Author     : gcarlos
--%>

<%@page contentType="application/json" pageEncoding="UTF-8"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<bean:define id="j" value="0"/>
[
    <logic:iterate id="modulo" name="listaModulo" indexId="i" >
        ${i>0 ? "," : ""}
        {
            text: "<bean:write name="modulo" property="cmoduDescripcion"/>",
            id: "<bean:write name="modulo" property="cmoduDescripcion"/>",
            cls: "folder",
            children:
                [
                    <logic:iterate id="opcion" name="listaOpcion">
                        <logic:equal name="opcion" property="nmodu_Codigo" value="${modulo.nmoduCodigo}">
                            ${j>0 ? "," : ""}
                            {
                                text: "<bean:write name="opcion" property="copci_Descripcion"/>",
                                id: "<bean:write name="opcion" property="copci_Descripcion"/>",
                                cls: "folder",
                                leaf: true,
                                url:"<bean:write name="opcion" property="copci_Url"/>",
                                cargarPantalla: function(){
                                    <bean:write name="opcion" property="copci_Url"/>
                                }
                            }
                            <bean:define id="j" value="${j+1}"/>
                        </logic:equal>
                    </logic:iterate>
                   <bean:define id="j" value="0"/>
                ]
        }
    </logic:iterate>
]
